/*
 * @Author: 1960116313@qq.com 1960116313@qq.com
 * @Date: 2023-10-23 14:13:58
 * @LastEditors: 1960116313@qq.com 1960116313@qq.com
 * @LastEditTime: 2023-10-24 09:48:43
 * @FilePath: \panuniapp\src\main.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createSSRApp } from "vue";
import App from "./App.vue";
import { navTo, navBack, navReLaunch } from "./install/navigate";
import { msg, showModal, prePage } from "./install/msg";
import uView from './uni_modules/vk-uview-ui';
import "./styles/index.scss";
//挂载pinia
import { createPinia } from "pinia";
const pinia = createPinia();

export function createApp() {
  const app = createSSRApp(App);
  app.use(uView);
  app.config.globalProperties.$api = { msg, showModal, prePage };
  app.config.globalProperties.$mHelper = { navTo, navBack, navReLaunch };
  app.use(pinia);
  return {
    app,
  };
}
